<template>
  <!-- 数据范围 -->
  <div class="data-range-box">
    <div class="CardItems-box">
      <CardItems
        ref="tableCard"
        :card-config="cardConfig"
        :pop-config="popConfig"
        :select-config="selectConfig"
        :header-config="headerConfig"
      />
    </div>
  </div>
</template>

<script>
import CardItems from '@/components/CardItems'
import { cardConfig } from './config/cardConfig'
import { popConfig } from './config/popConfig'
import { headerConfig } from './config/tableConfig'
import { selectConfig } from './config/selectConfig'

export default {
  name: 'DataRange',
  components: {
    CardItems
  },
  data() {
    return {
    }
  },
  computed: {
    /**
       * 卡片配置
       */
    cardConfig() {
      return cardConfig['data-range'] || {}
    },
    /**
       * 弹窗配置
       */
    popConfig() {
      return popConfig['data-range'] || {}
    },
    /**
       * 筛选配置
       */
    selectConfig() {
      return selectConfig['data-range'] || []
    },
    /**
       * 表头配置
       */
    headerConfig() {
      return headerConfig['data-range'] || []
    }
  },
  methods: {
  }
}
</script>

<style lang="scss" scoped>
  .data-range-box {
    display: flex;
    width: 100%;
    height: 100%;

    .CardItems-box {
      flex: 1;
    }
  }
</style>
